package com.itesm.distribuidos.mexicantrain;

import java.awt.Color;
import java.awt.FlowLayout;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class TrainTrack extends JPanel {
	private static final long serialVersionUID = 1L;
	private int tail;
	private boolean available;
	private boolean isMarked;

	public TrainTrack(String msg, int round) {
		this.setLayout(new FlowLayout(FlowLayout.LEADING));
		this.setBorder(BorderFactory.createLineBorder(Color.BLACK));
		this.setBackground(Color.WHITE);
		this.add(new JLabel(msg));
		this.tail = round;
		this.available = false;
		this.isMarked = false;
	}

	public int getTail() {
		return this.tail;
	}

	public boolean getAvailability() {
		return this.available;
	}

	public boolean isMarked() {
		return this.isMarked;
	}

	public void setTail(int newTail) {
		this.tail = newTail;
	}

	public void setAvailability(boolean status) {
		this.available = status;
	}

	public void setMarked(boolean status) {
		this.isMarked = status;
	}
}
